package com.rxyb.security.annotation;

import com.rxyb.security.config.BusiResourceServerAutoConfiguration;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;

import java.lang.annotation.*;

/**
 * 资源服务注解，资源服务只需加上改注解即可
 * <p>
 * 自动设置restTemplate负载均衡
 * 自动设置token获取用户信息为用户详细信息
 * 自动设置不拦截的url
 *
 * @author YangJh
 */
@Documented
@Inherited
@EnableResourceServer
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@EnableGlobalMethodSecurity(prePostEnabled = true)
@Import({BusiResourceServerAutoConfiguration.class})
public @interface EnableBusiResourceServer {

}
